#include <calendar.h>
|
static int | m_daylength [] |
| The length of the day between sun up and sun down im minutes (DK - Jutland) More...
|
|
◆ Calendar()
Calendar::Calendar |
( |
void |
| ) |
|
void Reset(void)
Definition: calendar.cpp:40
References Reset().
◆ Date()
long Calendar::Date |
( |
void |
| ) |
|
|
inline |
long m_date
Definition: calendar.h:86
References m_date.
Referenced by Farm::BulbHarvest(), Farm::BurnStrawStubble(), Rabbit_Population_Manager::CheckForRabbitBreedingConditions(), Farm::CheckRotationManagementLoop(), Farm::CutToHay(), VegElement::DoDevelopment(), UnsprayedFieldMargin::DoDevelopment(), Skylark_Population_Manager::DoFirst(), Skylark_Clutch::EndStep(), Skylark_Nestling::EndStep(), Skylark_PreFledgeling::EndStep(), Weather::GetSnow(), Farm::HandleEvents(), OptimisingFarm::HandleEvents(), Farm::Harvest(), OptimisingFarm::Harvest(), Farm::HarvestLong(), Farm::HayBailing(), Farm::HayTurning(), Farm::InitiateManagement(), Skylark_Clutch::OnFarmEvent(), Skylark_Nestling::OnFarmEvent(), Skylark_PreFledgeling::OnFarmEvent(), Skylark_Female::OnFarmEvent(), Skylark_Male::OnFarmEvent(), Skylark_Clutch::OnMumGone(), Farm::RowCultivation(), VegElement::SetGrowthPhase(), Newt_Juvenile::st_Develop(), Newt_Adult::st_Develop(), Newt_Juvenile::st_Disperse(), Newt_Adult::st_Disperse(), Newt_Juvenile::st_Overwinter(), Newt_Adult::st_Overwinter(), Skylark_Female::Step(), Skylark_Male::Step(), Farm::StrawChopping(), Farm::Strigling(), Farm::StriglingSow(), Farm::StubbleHarrowing(), Landscape::SupplyGlobalDate(), and Weather::Tick().
◆ DayInYear() [1/2]
int Calendar::DayInYear |
( |
int |
a_day, |
|
|
int |
a_month |
|
) |
| |
98 const int m_monthsum[12] = {
99 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
101 return m_monthsum[ a_month - 1 ] + a_day - 1;
◆ DayInYear() [2/2]
int Calendar::DayInYear |
( |
void |
| ) |
|
|
inline |
int m_day_in_year
Definition: calendar.h:91
References m_day_in_year.
Referenced by VegElement::CalcGooseForageResources(), Farm::CattleIsOut(), Farm::CattleIsOutLow(), Rabbit_Population_Manager::CheckForRabbitBreedingConditions(), Crop::ChooseNextCrop(), RoadsideVerge::DoDevelopment(), WaterBufferZone::DoDevelopment(), Orchard::DoDevelopment(), OrchardBand::DoDevelopment(), MownGrass::DoDevelopment(), Landscape::DumpMapInfoByArea(), VegElement::ForceGrowthInitialize(), VegElement::ForceGrowthTest(), LE::GetGooseNos(), LE::GetGooseNosToday(), LE::GetGooseNosTodayTimed(), LE::GetGooseSpNosToday(), LE::GetGooseSpNosTodayTimed(), LE::GetQuarryNos(), GlobalDate(), VegElement::PollenNectarPhenologyCalculation(), VegElement::ReduceVeg_Extended(), VegElement::ResetGeese(), Landscape::SupplyDayInYear(), Landscape::Tick(), Weather::Tick(), and LE::Trace().
◆ DayLength() [1/2]
int Calendar::DayLength |
( |
int |
a_day_in_year | ) |
|
69 if ( a_day_in_year<0 || a_day_in_year>364 ) {
static int m_daylength[]
The length of the day between sun up and sun down im minutes (DK - Jutland)
Definition: calendar.h:102
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: maperrormsg.cpp:59
class MapErrorMsg * g_msg
This pointer provides access the to the internal ALMaSS error message system.
Definition: maperrormsg.cpp:41
@ WARN_BUG
Definition: maperrormsg.h:34
References g_msg, m_daylength, MapErrorMsg::Warn(), and WARN_BUG.
◆ DayLength() [2/2]
int Calendar::DayLength |
( |
void |
| ) |
|
|
inline |
◆ GetDayInMonth()
int Calendar::GetDayInMonth |
( |
void |
| ) |
|
|
inline |
◆ GetDaylightProportion()
double Calendar::GetDaylightProportion |
( |
void |
| ) |
|
|
inline |
◆ GetFirstYear()
int Calendar::GetFirstYear |
( |
void |
| ) |
|
|
inline |
int m_firstyear
Definition: calendar.h:88
References m_firstyear.
◆ GetHour()
int Calendar::GetHour |
( |
void |
| ) |
|
|
inline |
◆ GetLastYear()
int Calendar::GetLastYear |
( |
void |
| ) |
|
|
inline |
◆ GetMinute()
int Calendar::GetMinute |
( |
void |
| ) |
|
|
inline |
◆ GetMonth()
int Calendar::GetMonth |
( |
void |
| ) |
|
|
inline |
◆ GetYear()
int Calendar::GetYear |
( |
void |
| ) |
|
|
inline |
◆ GetYearNumber()
int Calendar::GetYearNumber |
( |
void |
| ) |
|
|
inline |
◆ GlobalDate()
long Calendar::GlobalDate |
( |
int |
a_day, |
|
|
int |
a_month, |
|
|
int |
a_year |
|
) |
| |
long m_olddays
Definition: calendar.h:87
int DayInYear(void)
Definition: calendar.h:58
References DayInYear(), and m_olddays.
◆ JanFirst()
bool Calendar::JanFirst |
( |
void |
| ) |
|
|
inline |
◆ MarchFirst()
bool Calendar::MarchFirst |
( |
void |
| ) |
|
|
inline |
◆ OldDays()
long Calendar::OldDays |
( |
void |
| ) |
|
|
inline |
◆ Reset()
void Calendar::Reset |
( |
void |
| ) |
|
References m_date, m_day_in_month, m_day_in_year, m_firstyear, m_hours, m_janfirst, m_marchfirst, m_minutes, m_month, m_olddays, m_simulationyear, and m_year.
Referenced by Calendar(), Landscape::Landscape(), and Weather::Weather().
◆ SetFirstYear()
void Calendar::SetFirstYear |
( |
int |
a_year | ) |
|
|
inline |
◆ SetLastYear()
void Calendar::SetLastYear |
( |
int |
a_year | ) |
|
|
inline |
◆ Tick()
void Calendar::Tick |
( |
void |
| ) |
|
143 const int m_monthlength[12] = {
144 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
145 const int m_maxmonth = 11;
References m_date, m_day_in_month, m_day_in_year, m_daylength, m_daylightproportion, m_hours, m_janfirst, m_marchfirst, m_minutes, m_month, m_olddays, m_simulationyear, m_todayslength, and m_year.
Referenced by Landscape::Tick().
◆ TickHour()
bool Calendar::TickHour |
( |
void |
| ) |
|
◆ TickMinute()
bool Calendar::TickMinute |
( |
void |
| ) |
|
◆ TickMinute10()
bool Calendar::TickMinute10 |
( |
void |
| ) |
|
◆ ValidDate()
bool Calendar::ValidDate |
( |
int |
a_day, |
|
|
int |
a_month |
|
) |
| |
81 const int m_monthlength[12] = {
82 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
87 a_day > m_monthlength[ a_month - 1 ] ) {
◆ m_date
◆ m_day_in_month
int Calendar::m_day_in_month |
|
private |
◆ m_day_in_year
int Calendar::m_day_in_year |
|
private |
◆ m_daylength
int Calendar::m_daylength |
|
staticprivate |
The length of the day between sun up and sun down im minutes (DK - Jutland)
Referenced by DayLength(), and Tick().
◆ m_daylightproportion
double Calendar::m_daylightproportion |
|
private |
◆ m_firstyear
int Calendar::m_firstyear |
|
private |
◆ m_hours
◆ m_janfirst
bool Calendar::m_janfirst |
|
private |
◆ m_lastyear
◆ m_marchfirst
bool Calendar::m_marchfirst |
|
private |
◆ m_minutes
◆ m_month
◆ m_olddays
◆ m_simulationyear
int Calendar::m_simulationyear |
|
private |
◆ m_todayslength
int Calendar::m_todayslength |
|
private |
◆ m_year
The documentation for this class was generated from the following files:
- /builds/a1mass/almass_stable_oddox/Landscape/calendar.h
- /builds/a1mass/almass_stable_oddox/Landscape/calendar.cpp
- /builds/a1mass/almass_stable_oddox/Landscape/daylength.h